﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using Timetable.Base.Entities;
using Timetable.Base.Interfaces.Services.DataServices.Extensions;

namespace Timetable.Site.Controllers.Api
{
    public class SpecialityController : BaseApiController<Speciality>
    {
        public HttpResponseMessage GetByFaculty(int facultyId)
        {
            return CreateResponse<int, IEnumerable<Speciality>>(privateGetByFaculty, facultyId);
        }

        private IEnumerable<Speciality> privateGetByFaculty(int facultyId)
        {
            return DataService.GetByFacultyId(facultyId);
        }
    }
}
